from django.contrib import admin

# Register your models here.

from .models import Role, Users

class RoleAdmin(admin.ModelAdmin):
    list_display = ('name', 'key', 'sort')

class UsersAdmin(admin.ModelAdmin):
    fieldsets = (
        ('基本信息', {'fields': ('username', 'email', 'password')}),
        ('用户信息', {'fields': ('name', 'role')})
    )
    list_display = ('username', 'email', 'mobile')

admin.site.register(Role, RoleAdmin)
admin.site.register(Users, UsersAdmin)
